package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;

public class OutputStreamWriterDemo {

    public static void main(String[] args) throws IOException {

        OutputStream out = new FileOutputStream("test.txt");
        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(out);

        outputStreamWriter.write('a');  // a
        outputStreamWriter.write("温健");


        outputStreamWriter.close();
        out.close();
    }
}
